<!--
 * @Description: 
 * @Autor: Zhu_liangyu
 * @Date: 2020-05-09 10:52:55
--> 
<template>
  <!-- 配置中文 -->
  <a-config-provider :locale="locale">
    <div id="app">
      <web-socket ref="WebSocket"></web-socket>
      <router-view />
    </div>
  </a-config-provider>
</template>

<script>
import zhCN from "ant-design-vue/lib/locale-provider/zh_CN";
import moment from "moment";
import "moment/locale/zh-cn";
moment.locale("zh-cn");
import { AppDeviceEnquire } from "@/utils/mixin";
import WebSocket from "@/views/profile/WebSocket";

export default {
  mixins: [AppDeviceEnquire],
  components: { WebSocket },
  data() {
    return {
      locale: zhCN
    };
  },
  watch: {
    "$store.getters.userId": function(val) {
      if (val && val != "") this.$refs.WebSocket.initWebSocket();
    }
  }
};
</script>
<style scoped>
#app {
  height: 100%;
}
</style>

